Method and apparatus for searching for combined fixed codebook in CELP speech codec

ABSTRACT

Provided are a combined, fixed codebook searching method and apparatus used in a code excited linear prediction (CELP) speech codec. The method is used in a code excited linear prediction (CELP) speech codec, and includes searching for a fixed codebook using a full search method that searches for the fixed codebook at all pulse positions; selecting a fixed codebook searching method by counting the number of users who are accessing a gateway, comparing the number of users with a predetermined threshold, and selecting a proper fixed codebook searching method based on the result of comparison; searching for the fixed codebook using the selected fixed codebook searching method; and checking whether the search for the fixed codebook is complete for all tracks of the CELP speech codec, terminating a routine of searching for the fixed codebook when it is determined the search is complete for all the tracks, and selecting a fixed codebook searching method again in consideration of the number of gateway users when there remains a track to be searched for. Accordingly, a fixed codebook searching method is selected in consideration of the number of users who are accessing a gateway, thereby enabling an effective adjustment of either the quality of sound or the channel capacity of the gateway.

[0001] This application claims the priority of Korean Patent ApplicationNo. 2002-69587 filed on 11 Nov. 2002, in the Korean IntellectualProperty Office, the disclosure of which is incorporated herein in itsentirety by reference.

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] The present invention relates to a method and apparatus forsearching for a fixed codebook used in a code excited linear prediction(CELP) speech codec.

[0004] 2. Description of the Related Art

[0005] There are various ways of converting speech into a digital signalthat can be easily transmitted. The conversion of speech into a digitalsignal and compression of the digital signal are performed by a vocoder,that is, a speech encoder. Vocoders are categorized into three types: awaveform codec, a source codec, and a hybrid codec. A code excitedlinear prediction (CELP) speech codec is a kind of a hybrid codec thatuses a compression algorithm used during speech encoding at a low bitspeed. The CELP speech codec is capable of generating a high-qualityspeech signal at a bit rate of transmission lower than 16 kbps.

[0006] To compress a speech signal, the CELP speech codec makes acodebook using different white Gaussian noises and transmits an index,instead of the speech signal, which corresponds to an optimum whiteGaussian noise stream. In the optimum white Gaussian noise stream, anerror between an input speech signal and synthesis voice is minimized.The channel capacity of a gateway for use in a Voice over InternetProtocol (VoIP) depends largely on the complexity of a speech codec. Inturn, the complexity of the speech codec, which uses the CELP technique,is determined by the type of a fixed codebook search method.

[0007]FIG. 1 is a table illustrating the structure of a G.729 speechcodec. As shown in FIG. 1, pulses i₀, i₁, i₂, and i₃ are generated ontracks #0, #1, #2, and #3, respectively, each pulse having amplitude +1or −1. Pulse position indexes of track #0 are 0, 5, 10, . . . , and 35;pulse position indexes of track #1 are 1, 6, 11, . . . , 36; pulseposition indexes of track # 2 are 2, 7, 12, . . . , 37; and pulseposition indexes of track #3 are 3, 8, 13, . . . , 39. Searching for afixed codebook is to detect an optimum pulse position of each of tracks#0 through #3.

[0008] A full search method, which is included in the fixed codebooksearch method, detects a fixed codebook at every possible pulsepositions. Thus, good-quality speech can be obtained but the amount ofcalculation is large. For this reason, much time is spent on searchingfor the fixed codebook and the channel capacity of a gateway becomesinsufficient.

[0009] A focused search method, which is also included in the fixedcodebook search method, predetermines a threshold related to pulsepositions on a higher-rank track, compares all combinations fordetecting the pulse positions with the threshold, and excludes the leastpossible the combinations. Compared to the full search method, thefocused search method is less complex and requires a relativelylow-amount of calculation. Thus, the quality of sound is lower than thatobtained using the full search method.

[0010] A depth-first tree search method, which is also included in thefixed codebook search method, sequentially and continuously detectspulse positions for every two tracks. In this method, several candidatepulse positions are selected on one of two tracks using a correlationvalue between the two tracks, and the detection is performed on theother track, thereby largely reducing the amount of computation andmaintaining search complexity. As compared to the full search method andthe focused search method, the amount of computation can be greatlyreduced but the quality of sound is lower than the quality of soundobtained using the depth-first tree search method.

[0011] The above search methods, which are different types of the fixedcodebook search method, are applicable only to particular-type speechcodecs. Accordingly, it is difficult to adjust the quality of sound andthe amount of computation in consideration of the number of users whoaccess a gateway.

SUMMARY OF THE INVENTION

[0012] The present invention provides a combined, fixed codebooksearching method in which the full search method is used to increase thequality of sound when the number of gateway users is small and thefocused search method and the depth-first tree search method are used toincrease the channel capacity of the gateway otherwise, therebyadjusting either the quality of sound or the channel capacity dependingon the number of the gateway users.

[0013] According to an aspect of the present invention, there isprovided a combined, fixed codebook searching method used in a codeexcited linear prediction (CELP) speech codec, the method includingsearching for a fixed codebook using a full search method that searchesfor the fixed codebook at all pulse positions; selecting a fixedcodebook searching method by counting the number of users who areaccessing a gateway, comparing the number of users with a predeterminedthreshold, and selecting a proper fixed codebook searching method basedon the result of comparison; searching for the fixed codebook using theselected fixed codebook searching method; and checking whether thesearch for the fixed codebook is complete for all tracks of the CELPspeech codec, terminating a routine of searching for the fixed codebookwhen it is determined the search is complete for all the tracks, andselecting a fixed codebook searching method again in consideration ofthe number of gateway users when there remains a track to be searchedfor.

[0014] According to another aspect of the present invention, there isprovided a combined, fixed codebook searching apparatus used in a CELPspeech codec, the apparatus comprising a full-search processor thatsearches for a fixed codebook using the full search method that searchesfor the fixed codebook at all pulse positions; a search method selectorthat counts the number of gateway users who are accessing a gateway,compares the number of gateway users with a predetermined set value, andselects a fixed codebook search method based on the result ofcomparison; and a fixed codebook search processor that searches for thefixed codebook using the selected fixed codebook search method selected.

BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The above and other aspects and advantages of the presentinvention will become more apparent by describing in detail preferredembodiments thereof with reference to the attached drawings in which:

[0016]FIG. 1 is a table illustrating a structure of a fixed codebookused in a G.729 speech codec;

[0017]FIG. 2 is a flowchart illustrating a method of searching for afixed codebook in a speech codec used in a gateway, according to apreferred embodiment of the present invention; and

[0018]FIG. 3 is a block diagram illustrating a structure of a fixedcodebook searching apparatus used in a code excited linear prediction(CELP) speech codec, according to a preferred embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE INVENTION

[0019] Hereinafter, preferred embodiments of the present invention willbe described in detail with reference to the accompanying drawings.

[0020] A fixed codebook search is to search for a pulse position m_(i)that satisfies the following equation: $\begin{matrix}{{\max {\frac{\left\{ {\sum\limits_{i = 0}^{M - 1}{{sign}\left\{ {b\left( m_{i} \right)} \right\} {d\left( m_{i} \right)}}} \right\}^{2}}{{\sum\limits_{i = 0}^{M - 1}\quad {\varphi \left( {m_{i,}m_{i}} \right)}} + {2{\sum\limits_{i = 0}^{M - 1}{\sum\limits_{j = {i + 1}}^{M - 1}{{sign}\left\{ {b\left( m_{i} \right)} \right\} {sign}\left\{ {d\left( m_{j} \right)} \right\} {\varphi \left( {m_{i,}m_{i}} \right)}}}}}}}},} & (1)\end{matrix}$

[0021] wherein M denotes the number of pulse positions per track, b(n)denotes a pulse-position likelihood-estimate vector, and d and Φ can beexpressed using the following equations, respectively: $\begin{matrix}{{{d(n)} = {\sum\limits_{i = n}^{39}\quad {{x_{2}(i)}{h\left( {i - n} \right)}}}},{i = 0},\quad \ldots \quad,39,} & (2) \\{{{\varphi \left( {i,j} \right)} = {\sum\limits_{n = j}^{39}\quad {{h\left( {n - i} \right)}{h\left( {n - j} \right)}}}},{i = 0},\quad \ldots \quad,39,{j = 1},\quad \ldots \quad,39,} & (3)\end{matrix}$

[0022] wherein x₂(n) denotes a signal on which the fixed codebook searchis performed, and h(n) denotes an impulse response of a low-pass (LP)synthetic filter.

[0023] In Equation (1), b(n) can assume three shapes as defined in thefollowing equation: $\begin{matrix}{{{b(n)} = {\begin{matrix}\begin{matrix}{{r_{LTP}(n)},} \\{{d\quad n},}\end{matrix} \\{\frac{r_{LTP}(n)}{\sqrt{\sum\limits_{i = 0}^{N - 1}{{r_{LTP}(i)}{r_{LTP}(i)}}}} + \frac{d(n)}{\sqrt{\sum\limits_{i = 0}^{N - 1}{{d(i)}{d(i)}}}}}\end{matrix}}},} & (4)\end{matrix}$

[0024] wherein r_(LTP)(n) denotes a pitch residual signal and N denotesthe length of a sub frame. Since the quality of sound depends on thetype of pulse-position likelihood-estimate vector, it is important toselect a proper pulse-position likelihood-estimate vector duringsearching for a fixed codebook in a speech codec.

[0025]FIG. 2 is a flowchart illustrating a method of searching for afixed codebook in a speech codec used in a gateway, according to apreferred embodiment of the present invention.

[0026] Referring to FIG. 2, a fixed codebook is searched for using thefull search method in action 210. The full search method allowsdetection of a pulse position satisfying Equation (1) from all pulsepositions satisfying a fixed codebook structure. Using the full searchmethod, it is possible to obtain high-quality sound but the amount ofcomputation is large. Thus, since high-level processing capability isrequired, the channel capacity of the gateway is reduced.

[0027] In action 220, the number of gateway users who are accessing thegateway is counted, the gateway users' number is compared to apredetermined set value Thr1 or/and a predetermined set value Thr2, andan appropriate fixed codebook search method is selected based on theresult of comparison. In action 230, if the number of the gateway usersis smaller than predetermined set value Thr1, the full search method isselected to search for a fixed codebook, thereby enhancing the soundquality. In action 240, if the number of the gateway users is the sameas or larger than predetermined set value Thr1 and is smaller than orthe same as the predetermined set value Thr2, the focused search methodis selected, thereby increasing the channel capacity of the gatewayalthough the quality of sound is lower than that of the sound obtainedusing the full search method. In action 250, if the number of thegateway users is the same as or larger than predetermined set valueThr2, the depth-first tree search method is selected to search for afixed codebook, thereby greatly increasing the channel capacity of thegateway although the quality of sound is lower than that of the soundobtained using the full search method or the focused search method.

[0028] More specifically, in action 240 where the fixed codebook issearched for using the focused search method, a threshold is determinedusing correlation values between all pulse positions on an upper-ranktrack, a sum of the correlation values between combinations of the pulsepositions on the upper-rank track is compared with the threshold; andpulse positions of a last track are searched for when the sum of thecorrelation is larger than the threshold. As compared to the full searchmethod, the quality of sound is slightly lower, but the amount ofcomputation is reduced when a fixed codebook is searched using thefocused search method. As a result, the channel capacity of the gatewayis more than that of the gateway when using the full search method.Here, the threshold C_(thr) can be expressed as follows:

C _(thr) =C _(av) +K(C _(mzx) −C _(av))   (5),

[0029] wherein K denotes a constant that is used to adjust the number ofcombinations of pulse positions, the value of the constant K rangingbetween 0 and 1, and C_(max) and C_(av) denote a maximum correlationvalue and an average correlation value related to all pulse positions ofan upper-rank track, respectively. C_(max) and C_(av) can be expressedas follows: $\begin{matrix}{{C_{\max} = {\sum\limits_{m = 0}^{T - 2}{{Max}\quad {sign}\left\{ {b\left( {{T\quad n} + m} \right)} \right\} {d\left( {{T\quad n} + m} \right)}}}},} & (6) \\{{C_{a\quad v} = {\frac{1}{M}\left\{ {\sum\limits_{m = 0}^{T - 2}{\sum\limits_{n = 0}^{M - 1}{{sign}\left\{ {b\left( {{T\quad n} + m} \right)} \right\} {d\left( {{T\quad n} + m} \right)}}}} \right\}}},} & (7)\end{matrix}$

[0030] wherein T denotes the number of tracks in a sub frame. Thecoefficient K is a factor that changes the amount of computation and thechannel capacity of the gateway. Therefore, the coefficient K must bedetermined based on the processing capability of the gateway.

[0031] In action 250 where a fixed codebook is searched for using thedepth-first tree search method, pulse positions are sequentially andcontinuously searched for every two tracks. Several candidate pulsepositions are searched for and selected on one of the two tracks usingthe pulse-position likelihood-estimate vector |b(n)|, and then, thesearch of pulse positions is also performed on the other track. Theamount of computation required by the depth-first tree search method isstill less than that of computation required by the full search methodor the focused search method. Therefore, the channel capacity of thegateway can be increased considerably.

[0032] In action 260, the coefficient K is adjusted based on the numberof gateway users who are accessing the gateway after searching for thefixed codebook using the focused search method. The more the number ofthe gateway users, the greater the coefficient K. Thus, the channelcapacity of the gateway is increased by reducing the amount ofcomputation.

[0033] In action 270, the number of candidate pulse positions isadjusted based on the number of the gateway users after searching forthe fixed codebook using the depth-first tree search method. If thenumber of the gateway users increases, the number of the candidate pulsepositions decreases. In this case, the channel capacity of the gatewaycan also be increased by reducing the amount of computation.

[0034] In action 280, it is checked whether the search for the fixedcodebook is complete with respect to all tracks. If the search iscomplete, a routine of searching the fixed codebook is terminated. Ifthere is a track(s) to be searched for, actions 220 through 280 arerepeated.

[0035]FIG. 3 is a block diagram illustrating a structure of a combined,fixed codebook searching apparatus used in a CELP speech codec,according to a preferred embodiment of the present invention.

[0036] Referring to FIG. 3, the codebook searching apparatus includes afull-search processor 310, a search method selector 320, and a fixedcodebook search processor 330.

[0037] The full-search processor 310 searches for a fixed codebook atall pulse positions using the full search method. The search methodselector 320 counts the number of users who are accessing a gateway,compares the number of users with a predetermined set value, and selectsa fixed codebook searching method based on the result of comparison. Forinstance, when the number of users is smaller than a predetermined firstset value, the full search method is selected. When the number of usersis the same as or larger than the predetermined first set value and issmaller than or the same as a second set value, the focused searchmethod is selected. When the number of users is the same as or largerthan the predetermined second set value, the depth-first tree searchmethod is selected.

[0038] The fixed codebook search processor 330 searches for the fixedcodebook using a selected fixed codebook searching method. That is, thefixed codebook search processor 330 searches for the fixed codebookusing one of the full search method, the focused search method, and thedepth-first tree search method, which is selected by the search methodselector 320. If the search for the fixed codebook is not complete forall frames, the number of users who are accessing the gateway is countedagain, a fixed codebook searching method is selected, and the fixedcodebook search is performed using the selected method.

[0039] The present invention can be embodied as a computer readable codeon a computer readable medium. Here, the computer readable medium may beany medium capable of storing data that can be read by a computersystem, e.g., a read-only memory (ROM), a random access memory (RAM), acompact disc (CD)-ROM, a magnetic tape, a floppy disk, an optical datastorage device, and so on. Also, the computer readable medium may be acarrier wave that transmits data via the Internet, for example. Thecomputer readable recording medium can be distributed among computersystems that are interconnected through a network, and the presentinvention may be stored and implemented as a computer readable code inthe distributed system.

[0040] While this invention has been particularly shown and describedwith reference to preferred embodiments thereof, it will be understoodby those skilled in the art that various changes in form and details maybe made therein without departing from the spirit and scope of theinvention as defined by the appended claims.

[0041] As described above, according to the present invention, it ispossible to effectively select and adjust either the quality of sound orthe channel capacity of a gateway by appropriately selecting a fixedcodebook searching method in consideration of the number of users whoare accessing the gateway. For instance, the full search method isselected to enhance the quality of sound when the number of gatewayusers is small, and the focused search method or the depth-first treesearch method is selected to increase the channel capacity of thegateway when the number of gateway users increases.

What is claimed is:
 1. A combined, fixed codebook searching method usedin a code excited linear prediction (CELP) speech codec, the methodcomprising: searching for a fixed codebook using a full search methodthat searches for the fixed codebook at all pulse positions; selecting afixed codebook searching method by counting the number of users who areaccessing a gateway, comparing the number of users with a predeterminedthreshold, and selecting a proper fixed codebook searching method basedon the result of comparison; searching for the fixed codebook using theselected fixed codebook searching method; and checking whether thesearch for the fixed codebook is complete for all tracks of the CELPspeech codec, terminating a routine of searching for the fixed codebookwhen it is determined the search is complete for all the tracks, andselecting a fixed codebook searching method again in consideration ofthe number of gateway users when there remains a track to be searchedfor.
 2. The method of claim 1, wherein during selecting a fixed codebooksearching method, the full search method is selected when the number ofgateway users is smaller than a predetermined first threshold, a focusedsearch method is selected when the number of gateway users is the sameas or larger than the predetermined first threshold and is smaller thanor the same as a predetermined second threshold, and a depth-first treesearch method is selected when the number of gateway users is the sameas or larger than the predetermined second threshold.
 3. The method ofclaim 1, wherein during searching for a fixed codebook using a selectedfixed codebook searching method, when the focused search method isselected, a threshold is predetermined using the correlation between allpulse positions of an upper-rank track, a sum of combinations of all thepulse positions of the upper-rank track is compared with the threshold,and pulse positions of a last track are searched for only when the sumis larger than the threshold.
 4. The method of claim 3, wherein thethreshold is computed by subtracting an average correlation value C_(av)at all pulse positions of the upper-rank track from a maximumcorrelation value C_(max), multiplying the result of subtraction by apredetermined coefficient, and combining the result of multiplicationand the average correlation value C_(av).
 5. The method of claim 4,wherein the predetermined coefficient is a constant that adjusts thenumber of combinations of pulse positions and has a value rangingbetween 0 and 1, and the maximum correlation value C_(max) and theaverage correlation value C_(av) are expressed using the followingequations, respectively; $\begin{matrix}{{C_{\max} = {\sum\limits_{m = 0}^{T - 2}{{Max}\quad {sign}\left\{ {b\left( {{T\quad n} + m} \right)} \right\} {d\left( {{T\quad n} + m} \right)}}}},} \\{{C_{a\quad v} = {\frac{1}{M}\left\{ {\sum\limits_{m = 0}^{T - 2}{\sum\limits_{n = 0}^{M - 1}{{sign}\left\{ {b\left( {{T\quad n} + m} \right)} \right\} {d\left( {{T\quad n} + m} \right)}}}} \right\}}},}\end{matrix}$

wherein T denotes the number of tracks in a sub frame, M denotes thenumber of pulse positions per track, and b denotes a pulse-positionlikelihood-estimate vector.
 6. The method of claim 4, wherein thepredetermined coefficient is increased when the number of gateway userswho are accessing the gateway increases, and is reduced when the numberof gateway users decreases.
 7. The method of claim 1, during searchingfor a fixed codebook using a selected fixed codebook searching method,when the focused search method is selected, the fixed codebook issearched using the focused search method, and the coefficient K, whichadjusts the number of combinations of pulse positions, is adjusted inconsideration of the number of gateway users.
 8. The method of claim 1,wherein during searching for a fixed codebook using a selected fixedcodebook searching method, when the depth-first tree search method isselected, pulse positions are sequentially, continuously searched forevery two tracks, wherein several candidate pulse positions are selectedin one of two tracks using an absolute value of the pulse-positionlikelihood-estimate vector and pulse positions of the other track aresearched for.
 9. The method of claim 8, wherein the pulse-positionlikelihood-estimate vector is expressed using the following equation:${b(n)} = {\begin{matrix}\begin{matrix}{{r_{LTP}(n)},} \\{{d\quad n},}\end{matrix} \\{\frac{r_{LTP}(n)}{\sqrt{\sum\limits_{i = 0}^{N - 1}{{r_{LTP}(i)}{r_{LTP}(i)}}}} + \frac{{d(n)}\quad}{\sqrt{\sum\limits_{i = 0}^{N - 1}{{d(i)}{d(i)}}}}}\end{matrix}}$

wherein r_(LTP)(n) denotes a pitch residual signal and N denotes thelength of a sub frame.
 10. The method of claim 1, wherein duringsearching for a fixed codebook using a selected fixed codebook searchingmethod, when the depth-first tree search method is selected, the fixedcodebook is searched for using the depth-first tree search method, andthe number of candidate pulse positions is reduced when the number ofgateway users who are accessing the gateway increases.
 11. Acomputer-readable recording medium on which a program to execute themethod of claim 1 using a computer is recorded.
 12. A combined, fixedcodebook searching apparatus used in a CELP speech codec, the apparatuscomprising: a full-search processor that searches for a fixed codebookusing the full search method that searches for the fixed codebook at allpulse positions; a search method selector that counts the number ofgateway users who are accessing a gateway, compares the number ofgateway users with a predetermined set value, and selects a fixedcodebook search method based on the result of comparison; and a fixedcodebook search processor that searches for the fixed codebook using theselected fixed codebook search method selected.
 13. The apparatus ofclaim 12, wherein the search method selector selects the full searchmethod when the number of gateway users is smaller than a predeterminedfirst set value, selects the focused search method when the number ofgateway users is the same as or larger than the predetermined first setvalue and is smaller than or the same as a predetermined second setvalue, and selects the depth-first tree search method when the number ofgateway users is the same as or larger than the predetermined second setvalue.
 14. The apparatus of claim 12, wherein the fixed codebooksearching processor searches for the fixed codebook using one of thefull search method, the focused search method, and the depth-first treesearch method, based on an output of the search method selector.